<%@ page language="java" pageEncoding="utf-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<html>
<head>
    <html:base />
		<title>一品粥吧</title>
		<meta http-equiv="keywords" content="enter,your,keywords,here" />
		<meta http-equiv="description" content="A short description of this page." />
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		
		<link rel="stylesheet" type="text/css" href="../css/sheet2.css">
		
   	</head>
<body>

         <bean:define id="total" value="0"></bean:define>
       <logic:iterate id="item" name="items">
          <table id="${item.NO}" bgColor="white" width="100%">
          <tr><td align="left">名称：${item.pid}|${item.name }</td></tr>
          <tr>  <td align="left">编号：${item.NO }</td></tr>
          <tr>  <td align="left">价格：${item.price }</td></tr>
          <tr> <td align="left">数量：${item.amount}</td></tr>
          <tr>  <td align="left">小计：${item.price*item.amount}</td></tr>
          <tr> <td align="left"> 
          <html:form action="/deleteItem.do">
              <html:hidden property="id" value="${item.id}"></html:hidden>
              <html:submit>删除</html:submit>
          </html:form>
          <html:form action="/critic.do">
              <html:hidden property="id" value="${item.id}"></html:hidden>
              <html:submit>评价</html:submit>
          </html:form>
          
          <BUTTON>删除</BUTTON><BUTTON>评价</BUTTON><BUTTON><html:link page="/linkToDeleteItem.do?id=${item.id}">删除</html:link></BUTTON></td><td>评价</td></tr>
          
         </table>
         <br/>
        <bean:define id="total" value="${total+item.amount*item.price}"></bean:define>
   </logic:iterate>
    <center><Button onClick="history.back()">返回</Button></center>
   </body></html>